home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Online / Aminet / Search < prev    next >
Text File  |  1997-08-08  |  1KB  |  54 lines

  1. ; Searches the Aminet Online or CD Index for a specified string
  2.  
  3. set OutFile "RAM:Aminet"
  4. unset Match
  5.  
  6. version >NIL: version 37
  7. if WARN
  8.     echo ""
  9.     echo "You need at least version 2.04 of the operating system to run Index"
  10.     quit
  11.     endif
  12.  
  13. set choice `RequestChoice "Aminet Search" "Do you want to search the index of all files on Aminet*Nor the index of the Aminet CDs? (up to CD 16 + Sets 1-4)" " All | CD |Cancel"`
  14. if $choice EQ 0
  15.     quit
  16.     endif
  17.  
  18. unset str
  19. set str `:C/RequestString TITLE "Aminet Search" BODY "Please enter the string to search for"`
  20. get >NIL: str
  21. if WARN
  22.     quit
  23.     endif
  24.  
  25. if $choice EQ 1
  26.     :C/Head -7 INDEX >$OutFile
  27.     :C/FlashFind INDEX "$str"  >>$OutFile NOPREFS QUIET
  28.     If WARN
  29.         set Match FALSE
  30.         EndIf
  31. else
  32.     :C/Head -14 AminetCDs >$OutFile
  33.     :C/FlashFind AminetCDs "$str" >>$OutFile NOPREFS QUIET
  34.     if WARN
  35.         set Match FALSE
  36.         endif
  37.     endif
  38.  
  39. if $Match EQ "FALSE"
  40.     RequestChoice >NIL: "Index search" "No matches found for *"$str*"" "OK"
  41. else
  42.     Version >NIL: version 39
  43.     if WARN
  44.         AmigaGuide $OutFile
  45.     else
  46.         MultiView $OutFile
  47.         endif
  48.     endif
  49.  
  50. delete >NIL: $OutFile
  51. unset Match
  52. unset OutFile
  53. unset str
  54.